package san.web.demo;

import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;
import com.web.struts2.CRUDSupportAction;
@SuppressWarnings( { "finally", "serial", "deprecation" })
@ParentPackage("fileUpload")
@Results( { @Result(name = "reload", location = "news.shtml", type = "redirect") })
public class NewsAction extends CRUDSupportAction {
	@Override
	protected void prepareModel() throws Exception {
	}
	
	@Override
	public String delete() throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String input() throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String list() throws Exception {
		StringBuilder str=new StringBuilder();
		str.append("{'keylist':[");
		for(int i=0;i<10;i++){
			str.append("{'keyname':'" + "ddd" + i + "','keyextend':''},");
		}
		str.append("{'keyname':'" + "ddd" + "10'}]}");
		renderText(str.toString());
		return null;
	}

	@Override
	public String save() throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

}
